package com.hzdl.springbootdemo.controller;

import com.hzdl.springbootdemo.service.CategoryInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author:Asus
 * @date:2020/2/21
 * @description:
 */
@Controller
public class LonInController {

  @Resource
  private CategoryInfoService categoryInfoService ;

  @RequestMapping("login")
    public String login(Model model ){
      model.addAttribute("msg",new Date());
      model.addAttribute("list",categoryInfoService.findAll());
      return "login";
  }
}
